<?php

namespace app\admin\behavior;

class User
{
    public function run(&$user)
    {
//        var_dump($user);die;
        //删除活动积分记录
        \app\common\model\UserActivityPointsLog::where('user_id', $user['id'])->delete();
        //删除积分记录
        \app\common\model\UserPointsLog::where('user_id', $user['id'])->delete();
        //删除货值记录
        \app\common\model\UserCargoValueLog::where('user_id', $user['id'])->delete();
        //删除订单记录
        \app\common\model\Order::where('user_id', $user['id'])->delete();
        //删除订单商品记录
        \app\common\model\OrderItems::where('user_id', $user['id'])->delete();
        //删除周期统计
        \app\common\model\CycleOrderStat::where('user_id', $user['id'])->delete();
        //删除收货地址
        \addons\jieziaddress\model\JieziaddressUserAddress::where('user_id', $user['id'])->delete();
    }
}
